﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Imaginecup.gameState.malaria.manager
{
    public class GameResourceMan
    {
        private static GameResourceMan m_MalariaResourceMan = null;


        private int m_Money; 

        private GameResourceMan()
        {
            m_Money = 0;
        }

        public static GameResourceMan GetResourceMan()
        {
            if( m_MalariaResourceMan == null )
            {
                m_MalariaResourceMan = new GameResourceMan();
            }

            return m_MalariaResourceMan;
        }


        public int GetMoney()
        {
            return m_Money;
        }

        public void SetMoney( int money )
        {
            m_Money = money;
        }

        public void AddMoney(int addMoney)
        {
            m_Money += addMoney;

            if( m_Money < 0 )
            {
                m_Money = 0;
            }
        }

    
    }

}
